package com.ruoyi.article.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.article.mapper.ArticleMapper;
import com.ruoyi.article.domain.Article;
import com.ruoyi.article.service.IArticleService;

/**
 * 文章信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-11
 */
@Service
public class ArticleServiceImpl implements IArticleService 
{
    @Autowired
    private ArticleMapper articleMapper;

    /**
     * 查询文章信息
     * 
     * @param articleid 文章信息主键
     * @return 文章信息
     */
    @Override
    public Article selectArticleByArticleid(Long articleid)
    {
        return articleMapper.selectArticleByArticleid(articleid);
    }

    /**
     * 查询文章信息列表
     * 
     * @param article 文章信息
     * @return 文章信息
     */
    @Override
    public List<Article> selectArticleList(Article article)
    {
        return articleMapper.selectArticleList(article);
    }

    @Override
    public List<Article> selectArticleCommentByid(Article article) {
        return articleMapper.selectArticleCommentByid(article);
    }

    /**
     * 新增文章信息
     * 
     * @param article 文章信息
     * @return 结果
     */
    @Override
    public int insertArticle(Article article)
    {
        return articleMapper.insertArticle(article);
    }

    /**
     * 修改文章信息
     * 
     * @param article 文章信息
     * @return 结果
     */
    @Override
    public int updateArticle(Article article)
    {
        return articleMapper.updateArticle(article);
    }

    /**
     * 批量删除文章信息
     * 
     * @param articleids 需要删除的文章信息主键
     * @return 结果
     */
    @Override
    public int deleteArticleByArticleids(Long[] articleids)
    {
        return articleMapper.deleteArticleByArticleids(articleids);
    }

    /**
     * 删除文章信息信息
     * 
     * @param articleid 文章信息主键
     * @return 结果
     */
    @Override
    public int deleteArticleByArticleid(Long articleid)
    {
        return articleMapper.deleteArticleByArticleid(articleid);
    }
}
